<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="main.xsl"/>
<xsl:template name="content">


<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="2">
        <xsl:if test="group_validation">
            <div class="error">This form is contains errors. <br/>Please check highlighted fields.</div>            
    </xsl:if>
    </td>
  </tr>
  <tr>
    <td>
      <form name="group_add" method="post" action="/admin/security/group/edit&amp;group_id={//_get/group_id}">
        <table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="DDDDDD">
          <tr align="center">
            <td colspan="2" bgcolor="white"><b>Group Add/Edit</b></td>
          </tr>
        
          <tr> 
            <td align="right" bgcolor="white">
                <xsl:if test="group_validation/name/failed">
                <xsl:attribute name="class">error</xsl:attribute>
                </xsl:if>Name*</td>
            <td bgcolor="white">
              <input type="text" name="name" value="{_post/name|//group/name}" size="25"/>
            </td>
          </tr>        
          <tr> 
            <td align="right" valign="top" bgcolor="white">
                <xsl:if test="group_validation/role_id/failed">
                <xsl:attribute name="class">error</xsl:attribute>
                </xsl:if>Roles*</td>
            <td bgcolor="white">
            <table border="0" cellpadding="1" cellspacing="0">
              <xsl:for-each select="//role">
                <tr><td valign="middle">
                        <xsl:choose>
                            <xsl:when test="(position() mod 2) = 0"><xsl:attribute name="bgcolor">EEEEEE</xsl:attribute></xsl:when>
                            <xsl:otherwise></xsl:otherwise>
                        </xsl:choose>
                
				<input type="checkbox" value="{role_id}" name="role_id[]">
                
				<xsl:if test="(name=//group_role/name) or (role_id=//_post/role_id)">
                        <xsl:attribute name="checked">checked</xsl:attribute>
                    </xsl:if>
                </input></td>
                <td valign="middle" width="100">
                        <xsl:choose>
                            <xsl:when test="(position() mod 2) = 0"><xsl:attribute name="bgcolor">EEEEEE</xsl:attribute></xsl:when>
                            <xsl:otherwise></xsl:otherwise>
                        </xsl:choose>
                <xsl:value-of select="name"/></td>
                <td valign="middle" width="200">
                        <xsl:choose>
                            <xsl:when test="(position() mod 2) = 0"><xsl:attribute name="bgcolor">EEEEEE</xsl:attribute></xsl:when>
                            <xsl:otherwise></xsl:otherwise>
                        </xsl:choose>
                <xsl:value-of select="description"/></td>
                </tr>                    
            </xsl:for-each> 
            </table>

            </td>
          </tr>
           <tr> 
            <td bgcolor="white"></td>
            <td align="center" bgcolor="white" colspan="2">
              <input type="submit" name="submit" value="Submit"/>
            </td>
          </tr>
        </table>
      </form>
    </td>
  </tr>
</table>

</xsl:template>


</xsl:stylesheet>

